package ru.ssau.university.persistence.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name="SUBJECT")
public class Subject extends CommonEntity {
	
	private String title;
	
	@Column(name="TITLE")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
		
	public String toString() {
		return title;
	}
	
	public boolean equals(Object obj) {
		if (obj == null || !(obj instanceof Subject)) {
			return false;
		}
		Subject s = (Subject) obj;
		return s.getTitle().equals(this.title);
	}
}
